import React from 'react'
import { Route, Redirect, Switch } from 'react-router-dom'
import { Flex } from '@chakra-ui/core'
import Home from './components/Home'
import Form from './components/Form'

function App () {
  return (
    <Flex justify="center" align="center" h="100%" bgColor="#f1f1f1">
      <Switch>
        <Route path="/form" component={Form} />
        <Route path="/home" component={Home} />
        <Redirect from="/*" to="/form" />
      </Switch>
    </Flex>
  )
}

export default App
